<br />
<br />
<br />

<form class="form-horizontal" role="form" action = 'http://<?php echo base_url("index.php/pdms_pms/index"); ?>' method = "post">
	<input type = "hidden" name = "form1" value = "1" />
	<div class="form-group">
	    <label for="project_id" class="col-md-2 control-label">项目编号：</label>
		<div class="col-md-3">
			<select class="form-control" name='project_id' id='project_id'>
			<option value='NULL'>请选择项目</option>
			{projects}
				<option value='{id}'>{code} {name}</option>
			{/projects}
			</select>
		</div>
		<label for="pipe_class" class="col-md-2 control-label">管道等级：</label>
		<div class="col-md-3">
			<select class="form-control" name='pipe_class' id='pipe_class'>
				<option value='NULL'>请先选择项目</option>
			</select>
		</div>
		<div class="col-md-2">
			<input class="btn btn-success" type = "submit" value="选择"/>
		</div>
		
	</div>
</form>


<script type="text/javascript">
//异步加载Standard, Subtype 和 Material
jQuery(document).ready(function() {
	jQuery('#project_id').change(function() {
		var requestData = {project_id: jQuery('#project_id').children('option:selected').val()};
		jQuery('#pipe_class').load('http://<?php echo base_url("index.php/pdms_pms/get_pipe_class"); ?>', requestData);
	});

});
</script>